<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  	<meta charset="utf-8">
    <title><%= title %> - Blog</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
        crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="/fonts/font-awesome-4.7.0/css/font-awesome.css">
    <link rel='stylesheet' href='/stylesheets/style.css' />

    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
        crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
        crossorigin="anonymous"></script>
  </head>
  <body>
    <nav class="navbar navbar-inverse" role="navigation">
    	<div class="container">
    		<div class="container-fluid">
    			<div class="navbar-header">
    				<a href="/" class="navbar-brand">MyBlog</a>
    			</div>
    			<a href="/" class="navbar-brand">首页</a>
    			<ul class="nav navbar-nav navbar-right">
                    <% if (user) { %>
                        <li><a href="/post" title="发表文章"></a></li>
                        <li><a href="/logout"><span class="glyphicon-log-out"></span>登出</a></li>
                    <% } else{ %>
    				<li><a href="/reg"><span class="glyphicon glyphicon-user"></span>注册</a></li>
                    <li><a href="/login"><span class="glyphicon glyphicon-log-in"></span>登录</a></li>
                    <% } %>
    			</ul>
    		</div>
    	</div>
    </nav>
    <div class="container">
        <div>
            <% if(success) { %>
            <%= success%>
            <% } else { %>
            <%= error %>
            <% } %>
            <h3><%= title %></h3>
            <div class="userArea">
                <% if(user) {%>
                    <span>用户：<%= user.username %></span>
                <%} else { %>
                    <span>用户：游客</span>
                <% } %>
            </div>
        </div>
        <hr/>
    	<div class="col-sm-12">
  
